package com.waji.activity;

import com.avos.avoscloud.AVException;
import com.avos.avoscloud.AVMobilePhoneVerifyCallback;
import com.avos.avoscloud.AVOSCloud;
import com.avos.avoscloud.AVUser;
import com.avos.avoscloud.SignUpCallback;
import com.waji.activity.R;

import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class Register {

	public void register(final String username) {

		final String password = username + "1367119209";
		AVUser user = new AVUser();
		user.setUsername(username);
		user.setPassword(password);
		final Login log = new Login();
		user.signUpInBackground(new SignUpCallback() {
			@Override
			public void done(AVException e) {
				if (e == null) {
					log.login(username, password);

				} else {
					log.login(username, password);
				}
			}
		});
		log.login(username, password);
	}
}
